package com.wpzf.ndhc.utils;

import com.wpzf.ndhc.domain.*;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.xssf.usermodel.*;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileOutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

public class WpzfNdhcExcelUtils {
    public String export(HttpServletResponse response, String sheetName, List<WpCJ_TB_Hcjg_DTO> list, String xzqdm, Map<String, Object> parm) {
        //1创建一个 workbook， 对应一个 excel文件
        // HSSFWorkbook -> xls
        // XSSFWorkbook -> xlsx
        String rest = "";
        HSSFWorkbook workbook = new HSSFWorkbook();

        if (list.size() > 0) {
            for (WpCJ_TB_Hcjg_DTO map : list) {

                WpCJ_TB_Hcjg_DTO wpcj_tb_hcjg = map;

                /*获取核查结果*/
                if (wpcj_tb_hcjg.getWpCjTbhcjgDTOS() != null && wpcj_tb_hcjg.getWpCjTbhcjgDTOS().size() > 0) {
                    //2在 workbook 里添加一个 sheet
                    HSSFSheet sheet01 = workbook.createSheet(sheetName + "_核查结果");
                    //3在 sheet01 里添加 表头第 0 行
                    HSSFRow row = sheet01.createRow(0);
                    //4创建单元格风格 进行设置
                    HSSFCellStyle style = workbook.createCellStyle();
                    //设置单元格居中
                    style.setAlignment(HorizontalAlignment.CENTER);
                    int i = 0;
                    for (Map<String, Object> item : wpcj_tb_hcjg.wpCjTbhcjgDTOS_ColumnNameList) {
                        //设置表头 列名
                        HSSFCell cell = row.createCell(i);
                        String colName = getThJgColName(item.get("column_name") + "");
                        cell.setCellValue(colName);
                        System.out.println(colName);
                        i++;
                    }


                    int j = 0;
                    for (WpCjTbhcjgDTO item : wpcj_tb_hcjg.getWpCjTbhcjgDTOS()) {
                        row = sheet01.createRow(j + 1);
                        row.createCell(0).setCellValue((j + 1));//图斑编号
                        row.createCell(1).setCellValue(item.tbbh);//图斑编号
                        row.createCell(2).setCellValue(item.xzqdm);//行政区划代码
                        row.createCell(3).setCellValue(item.pdlx);//判定类型
                        row.createCell(4).setCellValue(item.pch);//批次号
                        row.createCell(5).setCellValue(item.nd);//年度
                        row.createCell(6).setCellValue(item.sfhc);//是否核查
                        row.createCell(7).setCellValue(item.shr);//审核人
                        row.createCell(8).setCellValue(item.username);//用户名
                        row.createCell(9).setCellValue(item.hfZphlxjc);//合法_照片合理性检查
                        row.createCell(10).setCellValue(item.hfYxzpdl);//合法_影像照片地类
                        row.createCell(11).setCellValue(item.hfSftgbjxfhxxgc);//合法_是否为边角细缝或线性工程等
                        row.createCell(12).setCellValue(item.hfDjgptwthbfwjzcl);//合法_对监管平台未套合部分是否提供举证材料
                        row.createCell(13).setCellValue(item.hfTbsmjsfyz);//合法_填报文件扫描件是否一致
                        row.createCell(14).setCellValue(item.hfTgzmwjsfkzwxzjsydpdyjdzj);//合法_提供证明文件是否可作为新增建设用地判定依据
                        row.createCell(15).setCellValue(item.hfQksmsfhl);//合法_情况说明是否合理
                        row.createCell(16).setCellValue(item.hfSftgzlpwslsj);//合法_是否提供自录批文矢量数据
                        row.createCell(17).setCellValue(item.hfBz);//合法_备注
                        row.createCell(18).setCellValue(item.wfCcdw);//违法_拆除到位
                        row.createCell(19).setCellValue(item.wfFgdw);//违法_复耕到位
                        row.createCell(20).setCellValue(item.wfBbsxlx);//违法_补办手续类型
                        row.createCell(21).setCellValue(item.wfZphlxjc);//违法_照片合理性检查
                        row.createCell(22).setCellValue(item.wfYxzpdl);//违法_影像\照片地类
                        row.createCell(23).setCellValue(item.wfSftgbjxfhxxgc);//违法_是否为边角细缝或线性工程等
                        row.createCell(24).setCellValue(item.wfDjgptwthbfwjzcl);//违法_对监管平台未套合部分是否提供举证材料
                        row.createCell(25).setCellValue(item.wfTbsmjsfyz);//违法_填报文号与扫描件是否一致
                        row.createCell(26).setCellValue(item.wfTgzmwjsfkzwxzjsydpdyjdzj);//违法_提供证明文件是否可作为新增建设用地判定依据
                        row.createCell(27).setCellValue(item.wfQksmsfhl);//违法_情况说明是否合理
                        row.createCell(28).setCellValue(item.wfSftgzlpwslsj);//违法_是否提供自录批文矢量数据
                        row.createCell(29).setCellValue(item.wfSsnydpzsj);//违法_设施农用地批准时间
                        row.createCell(30).setCellValue(item.wfSftgxzzfcjsyssnydytdzmcl);//违法_是否提供乡镇人民政府出具属于设施农业用地用途的证明材料
                        row.createCell(31).setCellValue(item.wfLsydpwly);//违法_临时用地批文来源
                        row.createCell(32).setCellValue(item.wfPzwhysmjhlx);//违法_批准文号与扫描件合理性
                        row.createCell(33).setCellValue(item.wfSlfwthqk);//违法_矢量范围套合情况
                        row.createCell(34).setCellValue(item.wfBz);//违法_备注
                        row.createCell(35).setCellValue(item.qtZphlxjc);//其他_照片合理性检查
                        row.createCell(36).setCellValue(item.qtYxzpdl);//其他_影像\照片地类
                        row.createCell(37).setCellValue(item.qtSsnydpzsj);//其他_设施农用地批准时间
                        row.createCell(38).setCellValue(item.qtLsydpwly);//其他_临时用地批文来源
                        row.createCell(39).setCellValue(item.qtPzwhysmjhlx);//其他_批准文号与扫描件合理性
                        row.createCell(40).setCellValue(item.qtSlfwthqk);//其他_矢量范围套合情况
                        row.createCell(41).setCellValue(item.qtSftgxjjcphcl);//其他_是否提供县级进出平衡材料
                        row.createCell(42).setCellValue(item.qtSfwygbzntn);//其他_是否为高标准农田内非连通农道
                        row.createCell(43).setCellValue(item.qtBawjsfhl);//其他_备案文件是否合理
                        row.createCell(44).setCellValue(item.qtSftgssnydbacl);//其他_是否提供设施农用地备案材料
                        row.createCell(45).setCellValue(item.qtSsnydbaclpzsj);//其他_设施农用地批准时间
                        row.createCell(46).setCellValue(item.qtSftgbacl);//其他_是否提供备案材料
                        row.createCell(47).setCellValue(item.qtZjssnydbaclpzsj);//其他_批准时间
                        row.createCell(48).setCellValue(item.qtSftgxzzfcjsyssnydytdzmcl);//其他_是否提供乡镇人民政府出具属于设施农业用地用途的证明材料
                        row.createCell(49).setCellValue(item.qtSftglsydpf);//其他_是否提供临时用地批复
                        row.createCell(50).setCellValue(item.qtQksmsfhl);//其他_情况说明是否合理
                        row.createCell(51).setCellValue(item.qtSffhsdwbhrdbz);//其他_是否符合实地未变化认定标准
                        row.createCell(52).setCellValue(item.qtSftgxxydss);//其他_是否提供先行用地手续
                        row.createCell(53).setCellValue(item.qtBz);//其他_备注
                        row.createCell(54).setCellValue(item.submitDate);//保存时间或结果确认时间
                        row.createCell(55).setCellValue(item.jlJlpf);//监理阶段_监理评分
                        row.createCell(56).setCellValue(item.sftj);//监理_是否提交
                        row.createCell(57).setCellValue(item.sftjSubmitdate);//提交时间(监理阶段和确认阶段)
                        row.createCell(58).setCellValue(item.jlJljgqr);//核查单位确认结果
                        row.createCell(59).setCellValue(item.hcjgsm);//结果核查说明
                        row.createCell(60).setCellValue("");//地块信息表的id
                        row.createCell(61).setCellValue(item.ywhj);//业务环节 0 1 2 3
                        row.createCell(62).setCellValue(item.status);//状态*//*
                        j++;
                    }
                }

                /*合法*******合法提供证明文件*/
                if (wpcj_tb_hcjg.getWpCjTbhcjgHftgzmwjDTO() != null && wpcj_tb_hcjg.getWpCjTbhcjgHftgzmwjDTO().size() > 0) {
                    //2在 workbook 里添加一个 sheet
                    HSSFSheet sheet02 = workbook.createSheet("合法提供证明文件");
                    //3在 sheet01 里添加 表头第 0 行
                    HSSFRow row = sheet02.createRow(0);
                    //4创建单元格风格 进行设置
                    HSSFCellStyle style = workbook.createCellStyle();
                    //设置单元格居中
                    style.setAlignment(HorizontalAlignment.CENTER);
                    int i = 0;
                    for (Map<String, Object> item : wpcj_tb_hcjg.wpCjTbhcjgHftgzmwjDTO_ColumnNameList) {
                        //设置表头 列名
                        HSSFCell cell = row.createCell(i);
                        String colName = getHfTgzmwjColName(item.get("column_name") + "");
                        cell.setCellValue(colName);
                        System.out.println(colName);
                        i++;
                    }

                    int j = 0;
                    for (WpCjTbhcjgHftgzmwjDTO item : wpcj_tb_hcjg.getWpCjTbhcjgHftgzmwjDTO()) {
                        row = sheet02.createRow(j + 1);
                        row.createCell(0).setCellValue((j + 1));//图斑编号
                        row.createCell(1).setCellValue(item.tbbh);//图斑编号
                        row.createCell(2).setCellValue(item.xzqdm);//行政区划代码
                        row.createCell(4).setCellValue(item.pch);//批次号
                        row.createCell(5).setCellValue(item.sort);//顺序
                        row.createCell(6).setCellValue(item.hfZlpwlx1);//合法_自录批文类型1
                        row.createCell(7).setCellValue(item.hfPzwh);//合法_批准文号
                        row.createCell(8).setCellValue(item.hfPzxmmc);//合法_批准项目名称
                        row.createCell(9).setCellValue(item.hfPzzygdmj);//合法_批准占用耕地面积
                        row.createCell(10).setCellValue(item.hfPzzygdmjdw);//合法_批准占用耕地面积单位
                        row.createCell(11).setCellValue(item.hfPzsj);//合法_批准时间
                        row.createCell(12).setCellValue(item.hfZlpwlx2);//合法_自录批文类型2
                        row.createCell(13).setCellValue(item.hfZlpwclmc);//合法_自录批文材料名称
                        row.createCell(14).setCellValue("");//地块信息表的id
                        row.createCell(15).setCellValue(item.ywhj);//业务环节 0 1 2 3
                        row.createCell(16).setCellValue(item.status);//状态*//*
                        j++;
                    }

                }


                /*违法*******违法提供证明文件*/
                if (wpcj_tb_hcjg.getWpCjTbhcjgWftgzmwjDTO() != null && wpcj_tb_hcjg.getWpCjTbhcjgWftgzmwjDTO().size() > 0) {
                    //2在 workbook 里添加一个 sheet
                    HSSFSheet sheet03 = workbook.createSheet("违法提供证明文件");
                    //3在 sheet01 里添加 表头第 0 行
                    HSSFRow row = sheet03.createRow(0);
                    //4创建单元格风格 进行设置
                    HSSFCellStyle style = workbook.createCellStyle();
                    //设置单元格居中
                    style.setAlignment(HorizontalAlignment.CENTER);
                    int i = 0;
                    for (Map<String, Object> item : wpcj_tb_hcjg.wpCjTbhcjgWftgzmwjDTO_ColumnNameList) {
                        //设置表头 列名
                        HSSFCell cell = row.createCell(i);
                        String colName = getWfTgzmwjColName(item.get("column_name") + "");
                        cell.setCellValue(colName);
                        System.out.println(colName);
                        i++;
                    }

                    int j = 0;
                    for (WpCjTbhcjgWftgzmwjDTO item : wpcj_tb_hcjg.getWpCjTbhcjgWftgzmwjDTO()) {
                        row = sheet03.createRow(j + 1);
                        row.createCell(0).setCellValue((j + 1));//图斑编号
                        row.createCell(1).setCellValue(item.tbbh);//图斑编号
                        row.createCell(2).setCellValue(item.xzqdm);//行政区划代码
                        row.createCell(4).setCellValue(item.pch);//批次号
                        row.createCell(5).setCellValue(item.sort);//顺序
                        row.createCell(6).setCellValue(item.wfZlpwlx1);//违法_自录批文类型1
                        row.createCell(7).setCellValue(item.wfPzwh);//违法_批准文号
                        row.createCell(8).setCellValue(item.wfPzxmmc);//违法_批准项目名称
                        row.createCell(9).setCellValue(item.wfPzzygdmj);//违法_批准占用耕地面积
                        row.createCell(10).setCellValue(item.wfPzzygdmjdw);//违法_批准占用耕地面积单位
                        row.createCell(11).setCellValue(item.wfPzsj);//违法_批准时间
                        row.createCell(12).setCellValue(item.wfZlpwlx2);//违法_自录批文类型2
                        row.createCell(13).setCellValue(item.wfZlpwclmc);//违法_自录批文材料名称
                        row.createCell(14).setCellValue("");//地块信息表的id
                        row.createCell(15).setCellValue(item.ywhj);//业务环节 0 1 2 3
                        row.createCell(16).setCellValue(item.status);//状态*//*
                        j++;
                    }
                }
                /*违法*******批准文号*/
                if (wpcj_tb_hcjg.getWpCjTbhcjgWfpzwhDTO() != null && wpcj_tb_hcjg.getWpCjTbhcjgWfpzwhDTO().size() > 0) {
                    //2在 workbook 里添加一个 sheet
                    HSSFSheet sheet04 = workbook.createSheet("违法批准文号");
                    //3在 sheet01 里添加 表头第 0 行
                    HSSFRow row = sheet04.createRow(0);
                    //4创建单元格风格 进行设置
                    HSSFCellStyle style = workbook.createCellStyle();
                    //设置单元格居中
                    style.setAlignment(HorizontalAlignment.CENTER);
                    int i = 0;
                    for (Map<String, Object> item : wpcj_tb_hcjg.wpCjTbhcjgWfpzwhDTO_ColumnNameList) {
                        //设置表头 列名
                        HSSFCell cell = row.createCell(i);
                        String colName = getWfPzwhColName(item.get("column_name") + "");
                        cell.setCellValue(colName);
                        System.out.println(colName);
                        i++;
                    }

                    int j = 0;
                    for (WpCjTbhcjgWfpzwhDTO item : wpcj_tb_hcjg.getWpCjTbhcjgWfpzwhDTO()) {
                        row = sheet04.createRow(j + 1);
                        row.createCell(0).setCellValue((j + 1));//图斑编号
                        row.createCell(1).setCellValue(item.tbbh);//图斑编号
                        row.createCell(2).setCellValue(item.xzqdm);//行政区划代码
                        row.createCell(4).setCellValue(item.pch);//批次号
                        row.createCell(5).setCellValue(item.sort);//顺序
                        row.createCell(6).setCellValue(item.wfPzwh);//违法_批准文号
                        row.createCell(7).setCellValue(item.wfPzxmmc);//违法_批准项目名称
                        row.createCell(8).setCellValue(item.wfPzsj);//违法_批准时间
                        row.createCell(9).setCellValue("");//地块信息表的id
                        row.createCell(10).setCellValue(item.ywhj);//业务环节 0 1 2 3
                        row.createCell(11).setCellValue(item.status);//状态*//*
                        j++;
                    }
                }


                /*其他*******批准文号*/
                if (wpcj_tb_hcjg.getWpCjTbhcjgQtpzwhDTO() != null && wpcj_tb_hcjg.getWpCjTbhcjgQtpzwhDTO().size() > 0) {
                    //2在 workbook 里添加一个 sheet
                    HSSFSheet sheet05 = workbook.createSheet("其他批准文号");
                    //3在 sheet01 里添加 表头第 0 行
                    HSSFRow row = sheet05.createRow(0);
                    //4创建单元格风格 进行设置
                    HSSFCellStyle style = workbook.createCellStyle();
                    //设置单元格居中
                    style.setAlignment(HorizontalAlignment.CENTER);
                    int i = 0;
                    for (Map<String, Object> item : wpcj_tb_hcjg.wpCjTbhcjgQtpzwhDTO_ColumnNameList) {
                        //设置表头 列名
                        HSSFCell cell = row.createCell(i);
                        String colName = getQtPzwhColName(item.get("column_name") + "");
                        cell.setCellValue(colName);
                        System.out.println(colName);
                        i++;
                    }

                    int j = 0;
                    for (WpCjTbhcjgQtpzwhDTO item : wpcj_tb_hcjg.getWpCjTbhcjgQtpzwhDTO()) {
                        row = sheet05.createRow(j + 1);
                        row.createCell(0).setCellValue((j + 1));//图斑编号
                        row.createCell(1).setCellValue(item.tbbh);//图斑编号
                        row.createCell(2).setCellValue(item.xzqdm);//行政区划代码
                        row.createCell(4).setCellValue(item.pch);//批次号
                        row.createCell(5).setCellValue(item.sort);//顺序
                        row.createCell(6).setCellValue(item.qtPzwh);//其他_批准文号
                        row.createCell(7).setCellValue(item.qtPzxmmc);//其他_批准项目名称
                        row.createCell(8).setCellValue(item.qtPzsj);//其他_批准时间
                        row.createCell(9).setCellValue("");//地块信息表的id
                        row.createCell(10).setCellValue(item.ywhj);//业务环节 0 1 2 3
                        row.createCell(11).setCellValue(item.status);//状态*//*
                        j++;
                    }
                }
                /*其他*******是否占用耕地*/
                if (wpcj_tb_hcjg.getWpCjTbhcjgQtsfzygdDTO() != null && wpcj_tb_hcjg.getWpCjTbhcjgQtsfzygdDTO().size() > 0) {
                    //2在 workbook 里添加一个 sheet
                    HSSFSheet sheet06 = workbook.createSheet("其他是否占用耕地");
                    //3在 sheet01 里添加 表头第 0 行
                    HSSFRow row = sheet06.createRow(0);
                    //4创建单元格风格 进行设置
                    HSSFCellStyle style = workbook.createCellStyle();
                    //设置单元格居中
                    style.setAlignment(HorizontalAlignment.CENTER);
                    int i = 0;
                    for (Map<String, Object> item : wpcj_tb_hcjg.wpCjTbhcjgQtsfzygdDTO_ColumnNameList) {
                        //设置表头 列名
                        HSSFCell cell = row.createCell(i);
                        String colName = getQtsfzygdColName(item.get("column_name") + "");
                        cell.setCellValue(colName);
                        System.out.println(colName);
                        i++;
                    }

                    int j = 0;
                    for (WpCjTbhcjgQtsfzygdDTO item : wpcj_tb_hcjg.getWpCjTbhcjgQtsfzygdDTO()) {
                        row = sheet06.createRow(j + 1);
                        row.createCell(0).setCellValue((j + 1));//图斑编号
                        row.createCell(1).setCellValue(item.tbbh);//图斑编号
                        row.createCell(2).setCellValue(item.xzqdm);//行政区划代码
                        row.createCell(4).setCellValue(item.pch);//批次号
                        row.createCell(5).setCellValue(item.sort);//顺序
                        row.createCell(6).setCellValue(item.qtTgbawjsj);//其他_提供备案文件时间
                        row.createCell(7).setCellValue(item.qtClmc);//其他_材料名称
                        row.createCell(8).setCellValue("");//地块信息表的id
                        row.createCell(9).setCellValue(item.ywhj);//业务环节 0 1 2 3
                        row.createCell(10).setCellValue(item.status);//状态*//*
                        j++;
                    }
                }
                /*其他*******其他是否提供先行用地手续*/
                if (wpcj_tb_hcjg.getWpCjTbhcjgQtsftgxxydssDTO() != null && wpcj_tb_hcjg.getWpCjTbhcjgQtsftgxxydssDTO().size() > 0) {
                    //2在 workbook 里添加一个 sheet
                    HSSFSheet sheet07 = workbook.createSheet("其他是否提供先行用地手续");
                    //3在 sheet01 里添加 表头第 0 行
                    HSSFRow row = sheet07.createRow(0);
                    //4创建单元格风格 进行设置
                    HSSFCellStyle style = workbook.createCellStyle();
                    //设置单元格居中
                    style.setAlignment(HorizontalAlignment.CENTER);
                    int i = 0;
                    for (Map<String, Object> item : wpcj_tb_hcjg.wpCjTbhcjgQtsftgxxydssDTO_ColumnNameList) {
                        //设置表头 列名
                        HSSFCell cell = row.createCell(i);
                        String colName = getQtsftgxxydssColName(item.get("column_name") + "");
                        cell.setCellValue(colName);
                        System.out.println(colName);
                        i++;
                    }

                    int j = 0;
                    for (WpCjTbhcjgQtsftgxxydssDTO item : wpcj_tb_hcjg.getWpCjTbhcjgQtsftgxxydssDTO()) {
                        row = sheet07.createRow(j + 1);
                        row.createCell(0).setCellValue((j + 1));//图斑编号
                        row.createCell(1).setCellValue(item.tbbh);//图斑编号
                        row.createCell(2).setCellValue(item.xzqdm);//行政区划代码
                        row.createCell(4).setCellValue(item.pch);//批次号
                        row.createCell(5).setCellValue(item.sort);//顺序
                        row.createCell(6).setCellValue(item.qtSftgxxydssclmc);//其他_是否提供先行用地手续材料名称
                        row.createCell(7).setCellValue(item.qtSftgxxydsspfsj);//其他_是否提供先行用地手续批复时间
                        row.createCell(8).setCellValue("");//地块信息表的id
                        row.createCell(9).setCellValue(item.ywhj);//业务环节 0 1 2 3
                        row.createCell(10).setCellValue(item.status);//状态*//*
                        j++;
                    }
                }
            }
        }

        try {
            ServletOutputStream outputStream = response.getOutputStream();
            response.reset();
            long timeMillis = System.currentTimeMillis();
            String nowDate = new SimpleDateFormat("yyyyMMddHHMMss").format(new Date());
            response.setHeader("Content-disposition", "attachment; filename=" + xzqdm + "_" + nowDate + timeMillis + ".xlsx");
            response.setContentType("application/msexcel");
            workbook.write(outputStream);
            outputStream.close();
            rest = "success|" + nowDate + timeMillis + ".xlsx";
        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            rest = ex.getMessage();
        }
        return rest;
    }

    public String export(HttpServletResponse response, String sheetName, List<Map<String, Object>> dataList, List<String> Colomnlist, String tempath) {
        //1创建一个 workbook， 对应一个 excel文件
        // HSSFWorkbook -> xls
        // XSSFWorkbook -> xlsx
        String rest = "";
        XSSFWorkbook workbook = new XSSFWorkbook();

        if (dataList.size() > 0) {
            /*获取核查结果*/

            //2在 workbook 里添加一个 sheet
            XSSFSheet sheet01 = workbook.createSheet(sheetName + "");
            //3在 sheet01 里添加 表头第 0 行
            XSSFRow row = sheet01.createRow(0);
            //4创建单元格风格 进行设置
            XSSFCellStyle style = workbook.createCellStyle();
            //设置单元格居中
            style.setAlignment(HorizontalAlignment.CENTER);
            int i = 0;
            for (String item : Colomnlist) {
                //设置表头 列名
                XSSFCell cell = row.createCell(i);
                String colName = (item);
                cell.setCellValue(colName);
                System.out.println(colName);
                i++;
            }

            int j = 0;
            for (Map<String, Object> item : dataList) {
                row = sheet01.createRow(j + 1);
                row.createCell(0).setCellValue((j + 1));//序号
                if (sheetName.equals("任务情况统计（用户）")) {
                    row.createCell(1).setCellValue(item.get("pch") + "");//批次号
                    row.createCell(2).setCellValue(item.get("sheng") + "");//未完成
                    row.createCell(3).setCellValue(item.get("xian") + "");//已完成
                    row.createCell(4).setCellValue(item.get("xzqdm") + "");//待确认
                    row.createCell(5).setCellValue(item.get("pch") + "");//已确认
                    row.createCell(6).setCellValue(item.get("taskcount") + "");//批次号
                    row.createCell(7).setCellValue(item.get("ytj") + "");//未完成
                    row.createCell(8).setCellValue(item.get("yhc_cnt") + "");//已完成
                    row.createCell(9).setCellValue(item.get("dyr_cnt") + "");//待确认
                    row.createCell(10).setCellValue(item.get("yqr_cnt") + "");//已确认
                } else if (sheetName.equals("任务情况统计（用户）")) {
                    row.createCell(1).setCellValue(item.get("username") + "");//用户名
                    row.createCell(2).setCellValue(item.get("realname") + "");//姓名
                    row.createCell(3).setCellValue(item.get("pch") + "");//批次号
                    row.createCell(4).setCellValue(item.get("cnt") + "");//任务总数
                    row.createCell(5).setCellValue(item.get("ytjcnt") + "");//已提交数量
                    row.createCell(6).setCellValue(item.get("wtjcnt") + "");//未提交数量
                } else if (sheetName.equals("任务情况统计（用户）")) {
                    row.createCell(1).setCellValue(item.get("sheng") + "");//用户名
                    row.createCell(2).setCellValue(item.get("xian") + "");//姓名
                    row.createCell(3).setCellValue(item.get("xzqdm") + "");//批次号
                    row.createCell(4).setCellValue(item.get("task_tb_count") + "");//任务总数
                    row.createCell(5).setCellValue(item.get("yhc_count") + "");//已提交数量
                    row.createCell(6).setCellValue(item.get("whc_cnt") + "");//未提交数量
                    row.createCell(7).setCellValue(item.get("dqr_count") + "");//用户名
                    row.createCell(8).setCellValue(item.get("yqr_count") + "");//姓名
                    row.createCell(9).setCellValue(item.get("sftj") + "");//批次号
                } else if (sheetName.equals("核查结果说明")) {
                    row.createCell(1).setCellValue(objectToString(item.get("xzqdm_sheng")));
                    row.createCell(2).setCellValue(objectToString(item.get("xzqdm_xian")));
                    row.createCell(3).setCellValue(objectToString(item.get("xzq_sheng")));
                    row.createCell(4).setCellValue(objectToString(item.get("xzq_shi")));
                    row.createCell(5).setCellValue(objectToString(item.get("xzq_xian")));
                    row.createCell(6).setCellValue(objectToString(item.get("tbbh")));
                    row.createCell(7).setCellValue(objectToString(item.get("jcbh")));
                    row.createCell(8).setCellValue(objectToString(item.get("yd_month")));
                    row.createCell(9).setCellValue(objectToString(item.get("xfsj")));
                    row.createCell(10).setCellValue(objectToString(item.get("pdlx")));
                    row.createCell(11).setCellValue(objectToString(item.get("zphlxjc")));
                    row.createCell(12).setCellValue(objectToString(item.get("yxzpdl")));
                    row.createCell(13).setCellValue(objectToString(item.get("hcjgsm")));
                    row.createCell(14).setCellValue(objectToString(item.get("tjmj")));
                    row.createCell(15).setCellValue(objectToString(item.get("thdkmj")));
                    row.createCell(16).setCellValue(objectToString(item.get("thdkgdmj")));
                    row.createCell(17).setCellValue(objectToString(item.get("thdkzjbntmj")));
                    row.createCell(18).setCellValue(objectToString(item.get("thnydmj")));
                    row.createCell(19).setCellValue(objectToString(item.get("thdkstmj")));
                    row.createCell(20).setCellValue(objectToString(item.get("thstbhhxmj")));
                    row.createCell(21).setCellValue(objectToString(item.get("tbdkmj")));
                    row.createCell(22).setCellValue(objectToString(item.get("tbdkqzgdmj")));
                    row.createCell(23).setCellValue(objectToString(item.get("tbdkqzjbntmj")));
                    row.createCell(24).setCellValue(objectToString(item.get("tbnydmj")));
                    row.createCell(25).setCellValue(objectToString(item.get("tbdkstmj")));
                    row.createCell(26).setCellValue(objectToString(item.get("tbdkstbhhxmj")));
                    row.createCell(27).setCellValue(objectToString(item.get("hfsjytmc_1j")));
                    row.createCell(28).setCellValue(objectToString(item.get("hfsjytmc_2j")));
                    row.createCell(29).setCellValue(objectToString(item.get("hfpdyjsm")));
                    row.createCell(30).setCellValue(objectToString(item.get("wflxmc_1J")));
                    row.createCell(31).setCellValue(objectToString(item.get("wflxmc_2J")));
                    row.createCell(32).setCellValue(objectToString(item.get("wflxmc_3J")));
                    row.createCell(33).setCellValue(objectToString(item.get("wflxmc_4J")));
                    row.createCell(34).setCellValue(objectToString(item.get("wfsjytmc_1j")));
                    row.createCell(35).setCellValue(objectToString(item.get("wfsjytmc_2j")));
                    row.createCell(36).setCellValue(objectToString(item.get("wfpdyjsm")));
                    row.createCell(37).setCellValue(objectToString(item.get("clfs")));
                    row.createCell(38).setCellValue(objectToString(item.get("labh")));
                    row.createCell(39).setCellValue(objectToString(item.get("zglsqk1")));
                    row.createCell(40).setCellValue(objectToString(item.get("hftdymmj")));
                    row.createCell(41).setCellValue(objectToString(item.get("fgdwmj")));
                    row.createCell(42).setCellValue(objectToString(item.get("ccfgzjbntmj")));
                    row.createCell(43).setCellValue(objectToString(item.get("ccfgzstbhhxmj")));
                    row.createCell(44).setCellValue(objectToString(item.get("cfdwqk")));
                    row.createCell(45).setCellValue(objectToString(item.get("zglsqk2")));
                    row.createCell(46).setCellValue(objectToString(item.get("yjdbm")));
                    row.createCell(47).setCellValue(objectToString(item.get("qtsjytmc_1j")));
                    row.createCell(48).setCellValue(objectToString(item.get("qtsjytmc_2j")));
                    row.createCell(49).setCellValue(objectToString(item.get("wfxwbh")));
                    row.createCell(50).setCellValue(objectToString(item.get("wfxw_sjytmc")));
                    row.createCell(51).setCellValue(objectToString(item.get("sfjjxm")));
                    row.createCell(52).setCellValue(objectToString(item.get("sfyfyhfzzdyqxyjsdylwsss")));
                    row.createCell(53).setCellValue(objectToString(item.get("sfbzxajzf")));
                    row.createCell(54).setCellValue(objectToString(item.get("wfxw_xmlxmc")));
                    row.createCell(55).setCellValue(objectToString(item.get("wf_xmmc")));
                    row.createCell(56).setCellValue(objectToString(item.get("wf_xmzt")));
                    row.createCell(57).setCellValue(objectToString(item.get("wf_lxpzjg")));
                    row.createCell(58).setCellValue(objectToString(item.get("wf_lxpzwh")));
                    row.createCell(59).setCellValue(objectToString(item.get("sfxzlzgdjf")));
                    row.createCell(60).setCellValue(objectToString(item.get("sfwhzj")));
                    row.createCell(61).setCellValue(objectToString(item.get("sfdpf")));
                    row.createCell(62).setCellValue(objectToString(item.get("xgsj")));
                    row.createCell(63).setCellValue(objectToString(item.get("pwgs")));
                    row.createCell(64).setCellValue(objectToString(item.get("nydzypzwh")));
                    row.createCell(65).setCellValue(objectToString(item.get("nydzypwly")));
                    row.createCell(66).setCellValue(objectToString(item.get("nydzypzmj")));
                    row.createCell(67).setCellValue(objectToString(item.get("nydzypzjg")));
                    row.createCell(68).setCellValue(objectToString(item.get("nydzypzrq")));
                    row.createCell(69).setCellValue(objectToString(item.get("zjggpzwh")));
                    row.createCell(70).setCellValue(objectToString(item.get("zjggpwly")));
                    row.createCell(71).setCellValue(objectToString(item.get("zjggpzmj")));
                    row.createCell(72).setCellValue(objectToString(item.get("zjggpzjg")));
                    row.createCell(73).setCellValue(objectToString(item.get("zjggpzrq")));
                    row.createCell(74).setCellValue(objectToString(item.get("gkfqdpzwh")));
                    row.createCell(75).setCellValue(objectToString(item.get("gkfqdpwly")));
                    row.createCell(76).setCellValue(objectToString(item.get("gkfqdpzmj")));
                    row.createCell(77).setCellValue(objectToString(item.get("gkfqdpzjg")));
                    row.createCell(78).setCellValue(objectToString(item.get("gkfqdpzrq")));
                    row.createCell(79).setCellValue(objectToString(item.get("bdcqzspzwh")));
                    row.createCell(80).setCellValue(objectToString(item.get("bdcqzspwly")));
                    row.createCell(81).setCellValue(objectToString(item.get("bdcqzspzmj")));
                    row.createCell(82).setCellValue(objectToString(item.get("bdcqzspzjg")));
                    row.createCell(83).setCellValue(objectToString(item.get("bdcqzspzrq")));
                    row.createCell(84).setCellValue(objectToString(item.get("ssnydpzwh")));
                    row.createCell(85).setCellValue(objectToString(item.get("ssnydpwly")));
                    row.createCell(86).setCellValue(objectToString(item.get("ssnydpzmj")));
                    row.createCell(87).setCellValue(objectToString(item.get("ssnydpzjg")));
                    row.createCell(88).setCellValue(objectToString(item.get("ssnydpzrq")));
                    row.createCell(89).setCellValue(objectToString(item.get("tdzzyspzwh")));
                    row.createCell(90).setCellValue(objectToString(item.get("tdzzyspwly")));
                    row.createCell(91).setCellValue(objectToString(item.get("tdzzyspzmj")));
                    row.createCell(92).setCellValue(objectToString(item.get("tdzzyspzjg")));
                    row.createCell(93).setCellValue(objectToString(item.get("tdzzyspzrq")));
                    row.createCell(94).setCellValue(objectToString(item.get("qtpzwh")));
                    row.createCell(95).setCellValue(objectToString(item.get("qtpwly")));
                    row.createCell(96).setCellValue(objectToString(item.get("qtpzmj")));
                    row.createCell(97).setCellValue(objectToString(item.get("qtpzjg")));
                    row.createCell(98).setCellValue(objectToString(item.get("qtpzrq")));
                    row.createCell(99).setCellValue(objectToString(item.get("lsydpzwh")));
                    row.createCell(100).setCellValue(objectToString(item.get("lsydpwly")));
                    row.createCell(101).setCellValue(objectToString(item.get("lsydpzmj")));
                    row.createCell(102).setCellValue(objectToString(item.get("lsydpzjg")));
                    row.createCell(103).setCellValue(objectToString(item.get("lsydpzrq")));
                    row.createCell(104).setCellValue(objectToString(item.get("tdgypzwh")));
                    row.createCell(105).setCellValue(objectToString(item.get("tdgypwly")));
                    row.createCell(106).setCellValue(objectToString(item.get("tdgypzmj")));
                    row.createCell(107).setCellValue(objectToString(item.get("tdgypzjg")));
                    row.createCell(108).setCellValue(objectToString(item.get("tdgypzrq")));
                    row.createCell(109).setCellValue(objectToString(item.get("xxydpzwh")));
                    row.createCell(110).setCellValue(objectToString(item.get("xxydpwly")));
                    row.createCell(111).setCellValue(objectToString(item.get("xxydpzmj")));
                    row.createCell(112).setCellValue(objectToString(item.get("xxydpzjg")));
                    row.createCell(113).setCellValue(objectToString(item.get("xxydpzrq")));
                    row.createCell(114).setCellValue(objectToString(item.get("yspzwh")));
                    row.createCell(115).setCellValue(objectToString(item.get("yspwly")));
                    row.createCell(116).setCellValue(objectToString(item.get("yspzmj")));
                    row.createCell(117).setCellValue(objectToString(item.get("yspzjg")));
                    row.createCell(118).setCellValue(objectToString(item.get("yspzrq")));
                    row.createCell(119).setCellValue(objectToString(item.get("qtpdyjsm")));
                    row.createCell(120).setCellValue(objectToString(item.get("dkbsm")));
                    row.createCell(121).setCellValue(objectToString(item.get("jcmj")));
                    row.createCell(122).setCellValue(objectToString(item.get("wqtbbh")));
                    row.createCell(123).setCellValue(objectToString(item.get("bz")));
                    row.createCell(124).setCellValue(objectToString(item.get("jctbxzgdmj")));
                    row.createCell(125).setCellValue(objectToString(item.get("jctbxznydzmj")));
                    row.createCell(126).setCellValue(objectToString(item.get("dlrdjsydmj")));
                    row.createCell(127).setCellValue(objectToString(item.get("dlrdwlydmj")));
                    row.createCell(128).setCellValue(objectToString(item.get("zjbntmj")));
                    row.createCell(129).setCellValue(objectToString(item.get("mjzbzddsdxjxzqdm")));
                    row.createCell(130).setCellValue(objectToString(item.get("mjzbzddsdxjxzqmc")));
                    row.createCell(131).setCellValue(objectToString(item.get("mjzbzddxzjxzqdm")));
                    row.createCell(132).setCellValue(objectToString(item.get("mjzbzddxzjxzqmc")));
                    row.createCell(133).setCellValue(objectToString(item.get("mjzbzddcjxzqdm")));
                    row.createCell(134).setCellValue(objectToString(item.get("mjzbzddcjxzqmc")));
                    row.createCell(135).setCellValue(objectToString(item.get("nzyjsydxmtb2010zj")));
                    row.createCell(136).setCellValue(objectToString(item.get("tdzzysxm")));
                    row.createCell(137).setCellValue(objectToString(item.get("zjggxmcjq")));
                    row.createCell(138).setCellValue(objectToString(item.get("zjggxmjxq")));
                    row.createCell(139).setCellValue(objectToString(item.get("gkfqdfkxm")));
                    row.createCell(140).setCellValue(objectToString(item.get("wlydkfxm")));
                    row.createCell(141).setCellValue(objectToString(item.get("gdxx")));
                    row.createCell(142).setCellValue(objectToString(item.get("ysxmxx")));
                    row.createCell(143).setCellValue(objectToString(item.get("ssnydxx")));
                    row.createCell(144).setCellValue(objectToString(item.get("xxydxx")));
                    row.createCell(145).setCellValue(objectToString(item.get("kqxx")));
                    row.createCell(146).setCellValue(objectToString(item.get("qtkqxx")));
                    row.createCell(147).setCellValue(objectToString(item.get("sklx")));
                    row.createCell(148).setCellValue(objectToString(item.get("tskqmj")));
                    row.createCell(149).setCellValue(objectToString(item.get("yjmj")));
                    row.createCell(150).setCellValue(objectToString(item.get("zrbhqxx")));
                    row.createCell(151).setCellValue(objectToString(item.get("ysxwpdlrdgdmj")));
                    row.createCell(152).setCellValue(objectToString(item.get("ysxwpdlrdnydmj")));
                    row.createCell(153).setCellValue(objectToString(item.get("ysxwpdlrdjsydmj")));
                    row.createCell(154).setCellValue(objectToString(item.get("ysxwpdlrdwlydmj")));
                    row.createCell(155).setCellValue(objectToString(item.get("ysxwpdlrdjbntmj")));
                    row.createCell(156).setCellValue(objectToString(item.get("wsxwpdlrdgdmj")));
                    row.createCell(157).setCellValue(objectToString(item.get("wsxwpdlrdnydmj")));
                    row.createCell(158).setCellValue(objectToString(item.get("wsxwpdlrdjsydmj")));
                    row.createCell(159).setCellValue(objectToString(item.get("wsxwpdlrdwlydmj")));
                    row.createCell(160).setCellValue(objectToString(item.get("wsxwpdlrdstmj")));
                    row.createCell(161).setCellValue(objectToString(item.get("wsxwpdlrdjbntmj")));
                    row.createCell(162).setCellValue(objectToString(item.get("sffgdk")));
                    row.createCell(163).setCellValue(objectToString(item.get("skbj")));
                    row.createCell(164).setCellValue(objectToString(item.get("hf_sfwbjxfhxxgcd")));
                    row.createCell(165).setCellValue(objectToString(item.get("hf_djgptwthbfsftgjzcl")));
                    row.createCell(166).setCellValue(objectToString(item.get("hf_tbwhysmjsfyz")));
                    row.createCell(167).setCellValue(objectToString(item.get("hf_tgzmwjsfkzwxzjsydpdyj")));
                    row.createCell(168).setCellValue(objectToString(item.get("hf_qksmsfhl")));
                    row.createCell(169).setCellValue(objectToString(item.get("hf_sftgzlpwslsj")));
                    row.createCell(170).setCellValue(objectToString(item.get("hf_bz")));
                    row.createCell(171).setCellValue(objectToString(item.get("wf_sfwbjxfhxxgcd")));
                    row.createCell(172).setCellValue(objectToString(item.get("wf_djgptwthbfsftgjzcl")));
                    row.createCell(173).setCellValue(objectToString(item.get("wf_tbwhysmjsfyz")));
                    row.createCell(174).setCellValue(objectToString(item.get("wf_tgzmwjsfkzwxzjsydpdyj")));
                    row.createCell(175).setCellValue(objectToString(item.get("wf_qksmsfhl")));
                    row.createCell(176).setCellValue(objectToString(item.get("wf_sftgzlpwslsj")));
                    row.createCell(177).setCellValue(objectToString(item.get("wf_ssnydpzsj")));
                    row.createCell(178).setCellValue(objectToString(item.get("wf_sftgxzrmzfcjsyssnyydytdzmcl")));
                    row.createCell(179).setCellValue(objectToString(item.get("wf_lsydpwly")));
                    row.createCell(180).setCellValue(objectToString(item.get("wf_pzwhysmjhlx")));
                    row.createCell(181).setCellValue(objectToString(item.get("wf_slfwthqk")));
                    row.createCell(182).setCellValue(objectToString(item.get("wf_ccdw")));
                    row.createCell(183).setCellValue(objectToString(item.get("wf_fgdw")));
                    row.createCell(184).setCellValue(objectToString(item.get("wf_bbsxlx")));
                    row.createCell(185).setCellValue(objectToString(item.get("wf_bz")));
                    row.createCell(186).setCellValue(objectToString(item.get("qt_ssnydpzsj")));
                    row.createCell(187).setCellValue(objectToString(item.get("qt_lsydpwly")));
                    row.createCell(188).setCellValue(objectToString(item.get("qt_pzwhysmjhlx")));
                    row.createCell(189).setCellValue(objectToString(item.get("qt_slfwthqk")));
                    row.createCell(190).setCellValue(objectToString(item.get("qt_sftgxjjcphcl")));
                    row.createCell(191).setCellValue(objectToString(item.get("qt_sfwgbzntnfltnd")));
                    row.createCell(192).setCellValue(objectToString(item.get("qt_bawjsfhl")));
                    row.createCell(193).setCellValue(objectToString(item.get("qt_sftgssnydbacl")));
                    row.createCell(194).setCellValue(objectToString(item.get("qt_ssnydbaclpzsj")));
                    row.createCell(195).setCellValue(objectToString(item.get("qt_sftgbacl")));
                    row.createCell(196).setCellValue(objectToString(item.get("qt_pzsj1")));
                    row.createCell(197).setCellValue(objectToString(item.get("qt_sftgxzrmzfcjsyssnyydytdzmcl")));
                    row.createCell(198).setCellValue(objectToString(item.get("qt_sftglsydpf")));
                    row.createCell(199).setCellValue(objectToString(item.get("qt_sffhsdwbhbz")));
                    row.createCell(200).setCellValue(objectToString(item.get("qt_qksmsfhl")));
                    row.createCell(201).setCellValue(objectToString(item.get("qt_sffhsdwbhrdbz")));
                    row.createCell(202).setCellValue(objectToString(item.get("qt_sftgxxydsx")));
                    row.createCell(203).setCellValue(objectToString(item.get("qt_bz")));
                    row.createCell(204).setCellValue(objectToString(item.get("hf_pzwh")));
                    row.createCell(205).setCellValue(objectToString(item.get("hf_pzxmmc")));
                    row.createCell(206).setCellValue(objectToString(item.get("hf_pzsj")));
                    row.createCell(207).setCellValue(objectToString(item.get("hf_pzzygdmj")));
                    row.createCell(208).setCellValue(objectToString(item.get("hf_pzzygdmjdw")));
                    row.createCell(209).setCellValue(objectToString(item.get("hf_zlpwclmc")));
                    row.createCell(210).setCellValue(objectToString(item.get("hf_zlpwlx")));
                    row.createCell(211).setCellValue(objectToString(item.get("wf_pzwh1")));
                    row.createCell(212).setCellValue(objectToString(item.get("wf_pzxmmc1")));
                    row.createCell(213).setCellValue(objectToString(item.get("wf_pzsj1")));
                    row.createCell(214).setCellValue(objectToString(item.get("wf_zlpwlx")));
                    row.createCell(215).setCellValue(objectToString(item.get("wf_pzzygdmj")));
                    row.createCell(216).setCellValue(objectToString(item.get("wf_pzzygdmjdw")));
                    row.createCell(217).setCellValue(objectToString(item.get("wf_pzwh2")));
                    row.createCell(218).setCellValue(objectToString(item.get("wf_pzxmmc2")));
                    row.createCell(219).setCellValue(objectToString(item.get("wf_pzsj2")));
                    row.createCell(220).setCellValue(objectToString(item.get("wf_zlpwclmc")));
                    row.createCell(221).setCellValue(objectToString(item.get("qt_pzwh")));
                    row.createCell(222).setCellValue(objectToString(item.get("qt_pzxmmc")));
                    row.createCell(223).setCellValue(objectToString(item.get("qt_pzsj2")));
                    row.createCell(224).setCellValue(objectToString(item.get("qt_sftgxxydsxclmc")));
                    row.createCell(225).setCellValue(objectToString(item.get("qt_sftgxxydsxpfsj")));
                    row.createCell(226).setCellValue(objectToString(item.get("qt_tgbawjsj")));
                    row.createCell(227).setCellValue(objectToString(item.get("qt_clmc")));
                    row.createCell(228).setCellValue(objectToString(item.get("zzjglb")));
                    row.createCell(229).setCellValue(objectToString(item.get("jlpf")));
                    row.createCell(230).setCellValue(objectToString(item.get("dw_shr")));
                    row.createCell(231).setCellValue(objectToString(item.get("dw_shrxm")));
                    row.createCell(232).setCellValue(objectToString(item.get("dw_tjsj")));
                    row.createCell(233).setCellValue(objectToString(item.get("jl_shr")));
                    row.createCell(234).setCellValue(objectToString(item.get("jl_shrxm")));
                    row.createCell(235).setCellValue(objectToString(item.get("jl_tjsj")));
                    row.createCell(236).setCellValue(objectToString(item.get("jgbz")));
                } else if (sheetName.equals("不通过图斑列表")) {
                    row.createCell(1).setCellValue(objectToString(item.get("sheng")));
                    row.createCell(2).setCellValue(objectToString(item.get("shi")));
                    row.createCell(3).setCellValue(objectToString(item.get("xian")));
                    row.createCell(4).setCellValue(objectToString(item.get("tbbh")));//图斑编号
                    row.createCell(5).setCellValue(objectToString(item.get("pdlx")));//	判定类型
                    row.createCell(6).setCellValue(objectToString(item.get("shi_hcjl")));//	审核说明
                    row.createCell(7).setCellValue(objectToString(item.get("shi_hcsm")));//	结果核查说明
                    row.createCell(8).setCellValue(objectToString(item.get("hcjl")));//	核查结论
                    row.createCell(9).setCellValue(objectToString(item.get("hcsm")));//	审核说明
                    row.createCell(10).setCellValue(objectToString(item.get("hcjgsm")));//	结果核查说明
                }
                j++;
            }
        }

        try {

            String nowDate = new SimpleDateFormat("yyyyMMddHHMMss").format(new Date());

            FileOutputStream fileOut = new FileOutputStream(tempath + "/" + nowDate + ".xlsx");
            workbook.write(fileOut);
            fileOut.close();

          /*  response.setContentType("application/vnd.ms-excel");
            String resultFileName = URLEncoder.encode(nowDate+timeMillis+".xlsx", "UTF-8");
            response.setHeader("Content-disposition", "attachment;filename=" + resultFileName + ";" + "filename*=utf-8''" + resultFileName);
            workbook.write(response.getOutputStream());
            workbook.close();
            response.flushBuffer();*/

            rest = nowDate + ".xlsx";

        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            rest = "error";
        }
        return rest;
    }

    public String exportTbList(HttpServletResponse response, String sheetName, List<Map<String,Object>> dataList, List<String> Colomnlist, String tempath) {
        //1创建一个 workbook， 对应一个 excel文件
        // HSSFWorkbook -> xls
        // XSSFWorkbook -> xlsx
        String rest = "";
        XSSFWorkbook workbook = new XSSFWorkbook();

        if (dataList.size() > 0) {
            /*获取核查结果*/

            //2在 workbook 里添加一个 sheet
            XSSFSheet sheet01 = workbook.createSheet(sheetName + "");
            //3在 sheet01 里添加 表头第 0 行
            XSSFRow row = sheet01.createRow(0);
            //4创建单元格风格 进行设置
            XSSFCellStyle style = workbook.createCellStyle();
            //设置单元格居中
            style.setAlignment(HorizontalAlignment.CENTER);
            int i = 0;
            for (String item : Colomnlist) {
                //设置表头 列名
                XSSFCell cell = row.createCell(i);
                String colName = (item);
                cell.setCellValue(colName);
                System.out.println(colName);
                i++;
            }

            int j = 0;
            for (Map<String,Object> item : dataList) {
                row = sheet01.createRow(j + 1);
                row.createCell(0).setCellValue((j + 1));//序号
                row.createCell(1).setCellValue(objectToString(item.get("tbbsm")));
                row.createCell(2).setCellValue(objectToString(item.get("xzqdm")));
                row.createCell(3).setCellValue(objectToString(item.get("xzqmc")));
                row.createCell(4).setCellValue(objectToString(item.get("xzdm")));
                row.createCell(5).setCellValue(objectToString(item.get("xzmc")));
                row.createCell(6).setCellValue(objectToString(item.get("jcbh")));
                row.createCell(7).setCellValue(objectToString(item.get("tblx")));
                row.createCell(8).setCellValue(objectToString(item.get("tbtz")));
                row.createCell(9).setCellValue(objectToString(item.get("hsx")));
                row.createCell(10).setCellValue(objectToString(item.get("jcmj")));
                row.createCell(11).setCellValue(objectToString(item.get("jctqmj")));
                row.createCell(12).setCellValue(objectToString(item.get("bz")));
                row.createCell(13).setCellValue(objectToString(item.get("dlrdnydmj")));
                row.createCell(14).setCellValue(objectToString(item.get("dlrdgdmj")));
                row.createCell(15).setCellValue(objectToString(item.get("qtnydmj")));
                row.createCell(16).setCellValue(objectToString(item.get("dlrdjsydmj")));
                row.createCell(17).setCellValue(objectToString(item.get("dlrdwlydmj")));
                row.createCell(18).setCellValue(objectToString(item.get("nzy")));
                row.createCell(19).setCellValue(objectToString(item.get("zjgxj")));
                row.createCell(20).setCellValue(objectToString(item.get("xxydmj")));
                row.createCell(21).setCellValue(objectToString(item.get("wly")));
                row.createCell(22).setCellValue(objectToString(item.get("zjgcj")));
                row.createCell(23).setCellValue(objectToString(item.get("tdzz")));
                row.createCell(24).setCellValue(objectToString(item.get("gkfq")));
                row.createCell(25).setCellValue(objectToString(item.get("ssnydmj")));
                row.createCell(26).setCellValue(objectToString(item.get("lsydmj")));
                row.createCell(27).setCellValue(objectToString(item.get("fist_kyq")));
                row.createCell(28).setCellValue(objectToString(item.get("jbntmj")));
                row.createCell(29).setCellValue(objectToString(item.get("stbhhxmj")));
                row.createCell(30).setCellValue(objectToString(item.get("zrbhdmc")));
                j++;
            }
        }

        try {
            String nowDate = new SimpleDateFormat("yyyyMMddHHMMss").format(new Date());
            File folder = new File(tempath);
            if (!folder.exists() && !folder.isDirectory()) {
                folder.mkdirs();
            }
            FileOutputStream fileOut = new FileOutputStream(tempath + "/图斑列表" + nowDate + ".xlsx");
            workbook.write(fileOut);
            fileOut.close();

          /*  response.setContentType("application/vnd.ms-excel");
            String resultFileName = URLEncoder.encode(nowDate+timeMillis+".xlsx", "UTF-8");
            response.setHeader("Content-disposition", "attachment;filename=" + resultFileName + ";" + "filename*=utf-8''" + resultFileName);
            workbook.write(response.getOutputStream());
            workbook.close();
            response.flushBuffer();*/

            rest = "图斑列表" + nowDate + ".xlsx";

        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            rest = "error";
        }
        return rest;
    }

    public String exportGjjThDkList(HttpServletResponse response, String sheetName, List<WpCjGjjThDkNdDTO> dataList, List<String> Colomnlist, String tempath) {
        //1创建一个 workbook， 对应一个 excel文件
        // HSSFWorkbook -> xls
        // XSSFWorkbook -> xlsx
        String rest = "";
        XSSFWorkbook workbook = new XSSFWorkbook();

        if (dataList.size() > 0) {
            /*获取核查结果*/

            //2在 workbook 里添加一个 sheet
            XSSFSheet sheet01 = workbook.createSheet(sheetName + "");
            //3在 sheet01 里添加 表头第 0 行
            XSSFRow row = sheet01.createRow(0);
            //4创建单元格风格 进行设置
            XSSFCellStyle style = workbook.createCellStyle();
            //设置单元格居中
            style.setAlignment(HorizontalAlignment.CENTER);
            int i = 0;
            for (String item : Colomnlist) {
                //设置表头 列名
                XSSFCell cell = row.createCell(i);
                String colName = (item);
                cell.setCellValue(colName);
                System.out.println(colName);
                i++;
            }

            int j = 0;
            for (WpCjGjjThDkNdDTO item : dataList) {
                row = sheet01.createRow(j + 1);
                row.createCell(0).setCellValue((j + 1));//序号
                row.createCell(1).setCellValue(item.getDkbh());
                row.createCell(2).setCellValue(item.getPch());
                row.createCell(3).setCellValue(item.getXzqdm());
                row.createCell(4).setCellValue(item.getSqrxm());
                row.createCell(5).setCellValue(item.getSqthyy());
                row.createCell(6).setCellValue(item.getSqsj());
                String sfzz = item.getPt();
                if ("0".equals(sfzz)) {
                    row.createCell(7).setCellValue("国土云");
                } else if ("1".equals(sfzz)){
                    row.createCell(7).setCellValue("在线核查");
                }
                row.createCell(8).setCellValue(item.getShrxm());
                row.createCell(9).setCellValue(item.getShyj());
                row.createCell(10).setCellValue(item.getShyjsm());
                row.createCell(11).setCellValue(item.getShsj());
                j++;
            }
        }

        try {
            String nowDate = new SimpleDateFormat("yyyyMMddHHMMss").format(new Date());
            File folder = new File(tempath);
            if (!folder.exists() && !folder.isDirectory()) {
                folder.mkdirs();
            }
            FileOutputStream fileOut = new FileOutputStream(tempath + "/国家级退回地块列表" + nowDate + ".xlsx");
            workbook.write(fileOut);
            fileOut.close();

            rest = "国家级退回地块列表" + nowDate + ".xlsx";

        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            rest = "error";
        }
        return rest;
    }

    public String exportDkList(HttpServletResponse response, String sheetName, List<Map<String,Object>> dataList, List<String> Colomnlist, String tempath) {
        //1创建一个 workbook， 对应一个 excel文件
        // HSSFWorkbook -> xls
        // XSSFWorkbook -> xlsx
        String rest = "";
        XSSFWorkbook workbook = new XSSFWorkbook();

        if (dataList.size() > 0) {
            /*获取核查结果*/

            //2在 workbook 里添加一个 sheet
            XSSFSheet sheet01 = workbook.createSheet(sheetName + "");
            //3在 sheet01 里添加 表头第 0 行
            XSSFRow row = sheet01.createRow(0);
            //4创建单元格风格 进行设置
            XSSFCellStyle style = workbook.createCellStyle();
            //设置单元格居中
            style.setAlignment(HorizontalAlignment.CENTER);
            int i = 0;
            for (String item : Colomnlist) {
                //设置表头 列名
                XSSFCell cell = row.createCell(i);
                String colName = (item);
                cell.setCellValue(colName);
                System.out.println(colName);
                i++;
            }

            int j = 0;
            for (Map<String,Object> item : dataList) {
                row = sheet01.createRow(j + 1);
                row.createCell(0).setCellValue((j + 1));//序号
                row.createCell(1).setCellValue(objectToString(item.get("bsm")));
                row.createCell(2).setCellValue(objectToString(item.get("tbbsm")));
                row.createCell(3).setCellValue(objectToString(item.get("xzq")));
                row.createCell(4).setCellValue(objectToString(item.get("shi")));
                row.createCell(5).setCellValue(objectToString(item.get("xzqdm")));
                row.createCell(6).setCellValue(objectToString(item.get("xmc")));
                row.createCell(7).setCellValue(objectToString(item.get("dkbh")));
                row.createCell(8).setCellValue(objectToString(item.get("dkmc")));
                row.createCell(9).setCellValue(objectToString(item.get("dkmj")));
                row.createCell(10).setCellValue(objectToString(item.get("xzb")));
                row.createCell(11).setCellValue(objectToString(item.get("yzb")));
                row.createCell(12).setCellValue(objectToString(item.get("bz")));
                row.createCell(13).setCellValue(objectToString(item.get("kzxx")));
                row.createCell(14).setCellValue(objectToString(item.get("pdlx")));
                row.createCell(15).setCellValue(objectToString(item.get("sfbgjsyd")));
                row.createCell(16).setCellValue(objectToString(item.get("sfgdwf")));
                row.createCell(17).setCellValue(objectToString(item.get("gdmj")));
                row.createCell(18).setCellValue(objectToString(item.get("qtnydmj")));
                row.createCell(19).setCellValue(objectToString(item.get("jsydmj")));
                row.createCell(20).setCellValue(objectToString(item.get("wlydmj")));

                row.createCell(21).setCellValue(objectToString(item.get("wf_pdyjsm")));
                row.createCell(22).setCellValue(objectToString(item.get("xmmc")));
                row.createCell(23).setCellValue(objectToString(item.get("xmzt")));
                row.createCell(24).setCellValue(objectToString(item.get("xmlxmc")));
                row.createCell(25).setCellValue(objectToString(item.get("lxpzjg")));
                row.createCell(26).setCellValue(objectToString(item.get("lxpzwh")));
                row.createCell(27).setCellValue(objectToString(item.get("wf_sflamc")));

                row.createCell(28).setCellValue(objectToString(item.get("shjg")));
                row.createCell(29).setCellValue(objectToString(item.get("shsm")));

                j++;
            }
        }

        try {
            String nowDate = new SimpleDateFormat("yyyyMMddHHMMss").format(new Date());
            File folder = new File(tempath);
            if (!folder.exists() && !folder.isDirectory()) {
                folder.mkdirs();
            }
            FileOutputStream fileOut = new FileOutputStream(tempath + "/地块列表" + nowDate + ".xlsx");
            workbook.write(fileOut);
            fileOut.close();

          /*  response.setContentType("application/vnd.ms-excel");
            String resultFileName = URLEncoder.encode(nowDate+timeMillis+".xlsx", "UTF-8");
            response.setHeader("Content-disposition", "attachment;filename=" + resultFileName + ";" + "filename*=utf-8''" + resultFileName);
            workbook.write(response.getOutputStream());
            workbook.close();
            response.flushBuffer();*/

            rest = "地块列表" + nowDate + ".xlsx";

        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            rest = "error";
        }
        return rest;
    }

    public String exportList(HttpServletResponse response, String sheetName, List<WpzfNdhcYtbTbInfo> dataList, List<String> Colomnlist, String tempath) {
        //1创建一个 workbook， 对应一个 excel文件
        // HSSFWorkbook -> xls
        // XSSFWorkbook -> xlsx
        String rest = "";
        XSSFWorkbook workbook = new XSSFWorkbook();

        if (dataList.size() > 0) {
            /*获取核查结果*/

            //2在 workbook 里添加一个 sheet
            XSSFSheet sheet01 = workbook.createSheet(sheetName + "");
            //3在 sheet01 里添加 表头第 0 行
            XSSFRow row = sheet01.createRow(0);
            //4创建单元格风格 进行设置
            XSSFCellStyle style = workbook.createCellStyle();
            //设置单元格居中
            style.setAlignment(HorizontalAlignment.CENTER);
            int i = 0;
            for (String item : Colomnlist) {
                //设置表头 列名
                XSSFCell cell = row.createCell(i);
                String colName = (item);
                cell.setCellValue(colName);
                System.out.println(colName);
                i++;
            }

            int j = 0;
            for (WpzfNdhcYtbTbInfo item : dataList) {
                row = sheet01.createRow(j + 1);
                Colomnlist.add("省代码");
                Colomnlist.add("县代码");
                Colomnlist.add("省名称");
                Colomnlist.add("市名称");
                Colomnlist.add("县名称");
                Colomnlist.add("地块编号");
                Colomnlist.add("监测编号");
                Colomnlist.add("核查节点");
                Colomnlist.add("判定类型");
                Colomnlist.add("核查结论");
                Colomnlist.add("核查结果说明");
                Colomnlist.add("违法类型");
                Colomnlist.add("图斑分类");
                Colomnlist.add("具体情形");
                Colomnlist.add("核查说明");
                Colomnlist.add("实际用途");
                Colomnlist.add("判定依据说明");
                row.createCell(0).setCellValue((j + 1));//序号
                String xzqdm=item.getXzqdm();
                String provCode="";
                if(!xzqdm.equals("") && !xzqdm.equals("null") && xzqdm!=null )
                {
                    provCode=xzqdm.substring(0,2);
                }
                row.createCell(1).setCellValue(provCode);
                row.createCell(2).setCellValue(xzqdm);
                row.createCell(3).setCellValue(item.getSheng());
                row.createCell(4).setCellValue(item.getShi());
                row.createCell(5).setCellValue(item.getXian());
                row.createCell(6).setCellValue(item.getDkbh());
                row.createCell(7).setCellValue(item.getJcbh());
                row.createCell(8).setCellValue(item.getHcjd());

                row.createCell(9).setCellValue(item.getPdlx());
                row.createCell(10).setCellValue(item.getHcjl());
                row.createCell(11).setCellValue(item.getHcjgsm());
                row.createCell(12).setCellValue(item.getWflx());
                row.createCell(13).setCellValue(item.getTblx());
                row.createCell(14).setCellValue(item.getJtqx());
                row.createCell(15).setCellValue(item.getHcsm());
                row.createCell(16).setCellValue(item.getSjyt());
                row.createCell(17).setCellValue(item.getPdyjsm());
                j++;
            }
        }

        try {
            String nowDate = new SimpleDateFormat("yyyyMMddHHMMss").format(new Date());
            File folder = new File(tempath);
            if (!folder.exists() && !folder.isDirectory()) {
                folder.mkdirs();
            }
            FileOutputStream fileOut = new FileOutputStream(tempath + "/地块列表" + nowDate + ".xlsx");
            workbook.write(fileOut);
            fileOut.close();

          /*  response.setContentType("application/vnd.ms-excel");
            String resultFileName = URLEncoder.encode(nowDate+timeMillis+".xlsx", "UTF-8");
            response.setHeader("Content-disposition", "attachment;filename=" + resultFileName + ";" + "filename*=utf-8''" + resultFileName);
            workbook.write(response.getOutputStream());
            workbook.close();
            response.flushBuffer();*/

            rest = "地块列表" + nowDate + ".xlsx";

        } catch (Exception ex) {
            System.out.println(ex.getMessage());
            rest = "error";
        }
        return rest;
    }

    /*核查结果转换中文*/
    public String getThJgColName(String enName) {
        String ChinesName = "";
        if (enName.equals("id")) {
            ChinesName = "序号";
        } else if (enName.equals("tbbh")) {
            ChinesName = "图斑编号";
        } else if (enName.equals("xzqdm")) {
            ChinesName = "行政区划代码";
        } else if (enName.equals("pdlx")) {
            ChinesName = "判定类型";
        } else if (enName.equals("pch")) {
            ChinesName = "批次号";
        } else if (enName.equals("nd")) {
            ChinesName = "年度";
        } else if (enName.equals("sfhc")) {
            ChinesName = "是否核查";
        } else if (enName.equals("shr")) {
            ChinesName = "审核人";
        } else if (enName.equals("username")) {
            ChinesName = "用户名";
        } else if (enName.equals("hf_zphlxjc")) {
            ChinesName = "合法_照片合理性检查	";
        } else if (enName.equals("hf_yxzpdl")) {
            ChinesName = "合法_影像照片地类";
        } else if (enName.equals("hf_sftgbjxfhxxgc")) {
            ChinesName = "合法_是否为边角细缝或线性工程等";
        } else if (enName.equals("hf_djgptwthbfwjzcl")) {
            ChinesName = "合法_对监管平台未套合部分是否提供举证材料";
        } else if (enName.equals("hf_tbsmjsfyz")) {
            ChinesName = "合法_填报文件扫描件是否一致";
        } else if (enName.equals("hf_tgzmwjsfkzwxzjsydpdyjdzj")) {
            ChinesName = "合法_提供证明文件是否可作为新增建设用地判定依据";
        } else if (enName.equals("hf_qksmsfhl")) {
            ChinesName = "合法_情况说明是否合理";
        } else if (enName.equals("hf_sftgzlpwslsj")) {
            ChinesName = "合法_是否提供自录批文矢量数据";
        } else if (enName.equals("hf_bz")) {
            ChinesName = "合法_备注";
        } else if (enName.equals("wf_ccdw")) {
            ChinesName = "违法_拆除到位";
        } else if (enName.equals("wf_fgdw")) {
            ChinesName = "违法_复耕到位";
        } else if (enName.equals("wf_bbsxlx")) {
            ChinesName = "违法_补办手续类型";
        } else if (enName.equals("wf_zphlxjc")) {
            ChinesName = "违法_照片合理性检查";
        } else if (enName.equals("wf_yxzpdl")) {
            ChinesName = "违法_影像照片地类";
        } else if (enName.equals("wf_sftgbjxfhxxgc")) {
            ChinesName = "违法_是否为边角细缝或线性工程等";
        } else if (enName.equals("wf_djgptwthbfwjzcl")) {
            ChinesName = "违法_对监管平台未套合部分是否提供举证材料";
        } else if (enName.equals("wf_tbsmjsfyz")) {
            ChinesName = "违法_填报文号与扫描件是否一致";
        } else if (enName.equals("wf_tgzmwjsfkzwxzjsydpdyjdzj")) {
            ChinesName = "违法_提供证明文件是否可作为新增建设用地判定依据";
        } else if (enName.equals("wf_qksmsfhl")) {
            ChinesName = "违法_情况说明是否合理";
        } else if (enName.equals("wf_sftgzlpwslsj")) {
            ChinesName = "违法_是否提供自录批文矢量数据";
        } else if (enName.equals("wf_ssnydpzsj")) {
            ChinesName = "违法_设施农用地批准时间";
        } else if (enName.equals("wf_sftgxzzfcjsyssnydytdzmcl")) {
            ChinesName = "违法_是否提供乡镇人民政府出具属于设施农业用地用途的证明材料";
        } else if (enName.equals("wf_lsydpwly")) {
            ChinesName = "违法_临时用地批文来源";
        } else if (enName.equals("wf_pzwhysmjhlx")) {
            ChinesName = "违法_批准文号与扫描件合理性";
        } else if (enName.equals("wf_slfwthqk")) {
            ChinesName = "违法_矢量范围套合情况";
        } else if (enName.equals("wf_bz")) {
            ChinesName = "违法_备注";
        } else if (enName.equals("qt_zphlxjc")) {
            ChinesName = "其他_照片合理性检查";
        } else if (enName.equals("qt_yxzpdl")) {
            ChinesName = "其他_影像照片地类";
        } else if (enName.equals("qt_ssnydpzsj")) {
            ChinesName = "其他_设施农用地批准时间";
        } else if (enName.equals("qt_lsydpwly")) {
            ChinesName = "其他_临时用地批文来源";
        } else if (enName.equals("qt_pzwhysmjhlx")) {
            ChinesName = "其他_批准文号与扫描件合理性";
        } else if (enName.equals("qt_slfwthqk")) {
            ChinesName = "其他_矢量范围套合情况";
        } else if (enName.equals("qt_sftgxjjcphcl")) {
            ChinesName = "其他_是否提供县级进出平衡材料";
        } else if (enName.equals("qt_sfwygbzntn")) {
            ChinesName = "其他_是否为高标准农田内非连通农道";
        } else if (enName.equals("qt_bawjsfhl")) {
            ChinesName = "其他_备案文件是否合理";
        } else if (enName.equals("qt_sftgssnydbacl")) {
            ChinesName = "其他_是否提供设施农用地备案材料";
        } else if (enName.equals("qt_ssnydbaclpzsj")) {
            ChinesName = "其他_设施农用地批准时间";
        } else if (enName.equals("qt_sftgbacl")) {
            ChinesName = "其他_是否提供备案材料";
        } else if (enName.equals("qt_zjssnydbaclpzs")) {
            ChinesName = "	其他_批准时间";
        } else if (enName.equals("qt_sftgxzzfcjsyssnydytdzmcl")) {
            ChinesName = "其他_是否提供乡镇人民政府出具属于设施农业用地用途的证明材料";
        } else if (enName.equals("qt_sftglsydpf")) {
            ChinesName = "其他_是否提供临时用地批复";
        } else if (enName.equals("qt_qksmsfhl")) {
            ChinesName = "其他_情况说明是否合理";
        } else if (enName.equals("qt_sffhsdwbhrdbz")) {
            ChinesName = "其他_是否符合实地未变化认定标准";
        } else if (enName.equals("qt_sftgxxydss")) {
            ChinesName = "其他_是否提供先行用地手续";
        } else if (enName.equals("qt_bz")) {
            ChinesName = "其他_备注";
        } else if (enName.equals("submit_date")) {
            ChinesName = "保存时间或结果确认时间";
        } else if (enName.equals("jl_jlpf")) {
            ChinesName = "监理阶段_监理评分";
        } else if (enName.equals("sftj")) {
            ChinesName = "监理_是否提交";
        } else if (enName.equals("sftj_submitdate")) {
            ChinesName = "提交时间(监理阶段和确认阶段)";
        } else if (enName.equals("jl_jljgqr")) {
            ChinesName = "核查单位确认结果";
        } else if (enName.equals("hcjgsm")) {
            ChinesName = "结果核查说明";
        } else if (enName.equals("pid")) {
            ChinesName = "地块信息表的id";
        } else if (enName.equals("ywhj")) {
            ChinesName = "业务环节";
        } else if (enName.equals("status")) {
            ChinesName = "状态";
        }

        return ChinesName;
    }

    /*核查结果*******合法证明文件*************转换中文*/
    public String getHfTgzmwjColName(String enName) {
        String ChinesName = "";
        if (enName.equals("id")) {
            ChinesName = "序号";
        } else if (enName.equals("tbbh")) {
            ChinesName = "图斑编号";
        } else if (enName.equals("xzqdm")) {
            ChinesName = "行政区代码";
        } else if (enName.equals("pch")) {
            ChinesName = "批次号";
        } else if (enName.equals("sort")) {
            ChinesName = "顺序";
        } else if (enName.equals("hf_zlpwlx1")) {
            ChinesName = "合法_自录批文类型1";
        } else if (enName.equals("hf_pzwh")) {
            ChinesName = "合法_批准文号";
        } else if (enName.equals("hf_pzxmmc")) {
            ChinesName = "合法_批准项目名称";
        } else if (enName.equals("hf_pzzygdmj")) {
            ChinesName = "合法_批准占用耕地面积";
        } else if (enName.equals("hf_pzzygdmjdw")) {
            ChinesName = "合法_批准占用耕地面积单位";
        } else if (enName.equals("hf_pzsj")) {
            ChinesName = "合法_批准时间";
        } else if (enName.equals("hf_zlpwlx2")) {
            ChinesName = "合法_自录批文类型2";
        } else if (enName.equals("hf_zlpwclmc")) {
            ChinesName = "合法_自录批文材料名称";
        } else if (enName.equals("pid")) {
            ChinesName = "地块信息表的id值";
        } else if (enName.equals("ywhj")) {
            ChinesName = "业务环节";
        } else if (enName.equals("status")) {
            ChinesName = "状态";
        }

        return ChinesName;
    }


    /*核查结果*******违法证明文件*************转换中文*/
    public String getWfTgzmwjColName(String enName) {
        String ChinesName = "";
        if (enName.equals("id")) {
            ChinesName = "序号";
        } else if (enName.equals("tbbh")) {
            ChinesName = "图斑编号";
        } else if (enName.equals("xzqdm")) {
            ChinesName = "行政区代码";
        } else if (enName.equals("pch")) {
            ChinesName = "批次号";
        } else if (enName.equals("sort")) {
            ChinesName = "顺序";
        } else if (enName.equals("wf_zlpwlx1")) {
            ChinesName = "违法_自录批文类型1";
        } else if (enName.equals("wf_pzwh")) {
            ChinesName = "违法_批准文号";
        } else if (enName.equals("wf_pzxmmc")) {
            ChinesName = "违法_批准项目名称";
        } else if (enName.equals("wf_pzzygdmj")) {
            ChinesName = "违法_批准占用耕地面积";
        } else if (enName.equals("wf_pzzygdmjdw")) {
            ChinesName = "违法_批准占用耕地面积单位";
        } else if (enName.equals("wf_pzsj")) {
            ChinesName = "违法_批准时间";
        } else if (enName.equals("wf_zlpwlx2")) {
            ChinesName = "违法_自录批文类型2";
        } else if (enName.equals("wf_zlpwclmc")) {
            ChinesName = "违法_自录批文材料名称";
        } else if (enName.equals("pid")) {
            ChinesName = "地块信息表ID";
        } else if (enName.equals("ywhj")) {
            ChinesName = "业务环节";
        } else if (enName.equals("status")) {
            ChinesName = "状态";
        }

        return ChinesName;
    }

    /*核查结果*******违法批准文号*************转换中文*/
    public String getWfPzwhColName(String enName) {
        String ChinesName = "";
        if (enName.equals("id")) {
            ChinesName = "序号";
        } else if (enName.equals("tbbh")) {
            ChinesName = "图斑编号";
        }
        if (enName.equals("xzqdm")) {
            ChinesName = "行政区划代码";
        }
        if (enName.equals("pch")) {
            ChinesName = "批次号";
        }
        if (enName.equals("sort")) {
            ChinesName = "顺序";
        }
        if (enName.equals("wf_pzwh")) {
            ChinesName = "违法_批准文号";
        }
        if (enName.equals("wf_pzxmmc")) {
            ChinesName = "违法_批准项目名称";
        }
        if (enName.equals("wf_pzsj")) {
            ChinesName = "违法_批准时间";
        }
        if (enName.equals("id")) {
            ChinesName = "唯一值";
        }
        if (enName.equals("pid")) {
            ChinesName = "地块信息表的id值";
        }
        if (enName.equals("ywhj")) {
            ChinesName = "业务环节";
        }
        if (enName.equals("status")) {
            ChinesName = "状态  0代表无效";
        }


        return ChinesName;
    }


    /*核查结果*******其他是否占用耕地*************转换中文*/
    public String getQtsfzygdColName(String enName) {
        String ChinesName = "";
        if (enName.equals("id")) {
            ChinesName = "序号";
        } else if (enName.equals("tbbh")) {
            ChinesName = "图斑编号";
        } else if (enName.equals("xzqdm")) {
            ChinesName = "行政区代码";
        } else if (enName.equals("pch")) {
            ChinesName = "批次号";
        } else if (enName.equals("sort")) {
            ChinesName = "顺序";
        } else if (enName.equals("qt_tgbawjsj")) {
            ChinesName = "其他_提供备案文件时间";
        } else if (enName.equals("qt_clmc")) {
            ChinesName = "其他_材料名称";
        } else if (enName.equals("pid")) {
            ChinesName = "地块信息的id";
        } else if (enName.equals("ywhj")) {
            ChinesName = "业务环节";
        } else if (enName.equals("status")) {
            ChinesName = "状态";
        }


        return ChinesName;
    }

    /*核查结果*******其他是否提供先行用地手续*************转换中文*/
    public String getQtsftgxxydssColName(String enName) {
        String ChinesName = "";
        if (enName.equals("id")) {
            ChinesName = "序号";
        } else if (enName.equals("tbbh")) {
            ChinesName = "图斑编号";
        } else if (enName.equals("xzqdm")) {
            ChinesName = "行政区代码";
        } else if (enName.equals("pch")) {
            ChinesName = "批次号";
        } else if (enName.equals("sort")) {
            ChinesName = "顺序";
        } else if (enName.equals("qt_sftgxxydssclmc")) {
            ChinesName = "其他_是否提供先行用地手续材料名称";
        } else if (enName.equals("qt_sftgxxydsspfsj")) {
            ChinesName = "其他_是否提供先行用地手续批复时间";
        } else if (enName.equals("id")) {
            ChinesName = "唯一值";
        } else if (enName.equals("pid")) {
            ChinesName = "地块信息表的id";
        } else if (enName.equals("ywhj")) {
            ChinesName = "业务环节";
        } else if (enName.equals("status")) {
            ChinesName = "状态";
        }

        return ChinesName;
    }

    /*核查结果*******其他批准文号*************转换中文*/
    public String getQtPzwhColName(String enName) {
        String ChinesName = "";
        if (enName.equals("id")) {
            ChinesName = "序号";
        } else if (enName.equals("tbbh")) {
            ChinesName = "图斑编号";
        } else if (enName.equals("xzqdm")) {
            ChinesName = "行政区划代码";
        } else if (enName.equals("pch")) {
            ChinesName = "批次号";
        } else if (enName.equals("sort")) {
            ChinesName = "顺序";
        } else if (enName.equals("qt_pzwh")) {
            ChinesName = "其他_批准文号";
        } else if (enName.equals("qt_pzxmmc")) {
            ChinesName = "其他_批准项目名称";
        } else if (enName.equals("qt_pzsj")) {
            ChinesName = "其他_批准时间";
        } else if (enName.equals("id")) {
            ChinesName = "唯一值";
        } else if (enName.equals("pid")) {
            ChinesName = "地块信息表的id值";
        } else if (enName.equals("ywhj")) {
            ChinesName = "业务环节";
        } else if (enName.equals("status")) {
            ChinesName = "状态";
        }
        return ChinesName;
    }


    //null转换为空字符串
    public String objectToString(Object o) {
        return o == null ? "" : o + "";
    }


}
